﻿using UnityEngine;
using System.Collections;

using Hont.HyperWigglePackage;

public class HyperWiggleExample : MonoBehaviour
{
    public string resourcePath;
    IHyperWiggleData mData;
    HyperWiggle mHyperWiggle;


    void OnEnable()
    {
        mData = HyperWiggleUtil.GetHyperWiggleData(Resources.Load<TextAsset>(resourcePath).text);

        mHyperWiggle = new HyperWiggle();
        mHyperWiggle.Start(transform, mData, () => Debug.Log("Finished!"));
    }

    void Update()
    {
        mHyperWiggle.Update();
    }
}
